﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:v="clr-namespace:ShredTheLog.Views;assembly=ShredTheLog.Views"
    xmlns:vm="clr-namespace:ShredTheLog.ViewModels;assembly=ShredTheLog.ViewModels"
    xmlns:cnv="clr-namespace:ShredTheLog.Converters;assembly=ShredTheLog.Converters"
    xmlns:c="clr-namespace:ShredTheLog.Controls;assembly=ShredTheLog.Controls"
    >

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="CommonImages\Close.xaml"/>
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="CloseTabImageStyle" TargetType="{x:Type Image}">
        <Setter Property="Width" Value="10"/>
        <Setter Property="Height" Value="10"/>
        <Setter Property="Source" Value="{StaticResource CloseImage}"/>
    </Style> 
    
    <Style x:Key="CloseTabButtonStyle" TargetType="{x:Type Button}">
        <Setter Property="Command" Value="{Binding CloseCommand}"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="ToolTip" Value="{c:LocalizedString s_Close}"/>
    </Style>

    <DataTemplate DataType="{x:Type vm:HomePageViewModel}">
        <TextBlock Text="{c:LocalizedString s_Home}" VerticalAlignment="Center"/>
    </DataTemplate>

    <DataTemplate DataType="{x:Type vm:TextChatViewModel}">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{c:LocalizedString s_Tab_TextChat}" VerticalAlignment="Center" TextAlignment="Center"/>
            <Button Style="{StaticResource CloseTabButtonStyle}">
                <Image Style="{StaticResource CloseTabImageStyle}"/>
            </Button>
        </StackPanel>
    </DataTemplate>

    <DataTemplate DataType="{x:Type vm:ContactListViewModel}">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{c:LocalizedString s_Tab_ContactList}" VerticalAlignment="Center" TextAlignment="Center"/>
            <Button Style="{StaticResource CloseTabButtonStyle}">
                <Image Style="{StaticResource CloseTabImageStyle}"/>
            </Button>
        </StackPanel>
    </DataTemplate>

    <DataTemplate DataType="{x:Type vm:UserSearchViewModel}">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{c:LocalizedString s_Tab_UserSearch}" VerticalAlignment="Center" TextAlignment="Center"/>
            <Button Style="{StaticResource CloseTabButtonStyle}">
                <Image Style="{StaticResource CloseTabImageStyle}"/>
            </Button>
        </StackPanel>
    </DataTemplate>

</ResourceDictionary>